Problem: Let $f : \mathbb{R} \to \mathbb{R}$ be a function such that $f(1) = 1$ and
\[f(xy + f(x)) = xf(y) + f(x)\]for all real numbers $x$ and $y.$

Let $n$ be the number of possible values of $f \left( \frac{1}{2} \right),$ and let $s$ be the sum of all possible values of $f \left( \frac{1}{2} \right).$  Find $n \times s.$
Explanation: Setting $y = 0,$ we get
\[f(f(x)) = xf(0) + f(x)\]for all $x.$  In particular, $f(f(0)) = f(0).$

Setting $x = f(0)$ and $y = 0,$ we get
\[f(f(f(0))) = f(0)^2 + f(f(0)).\]Note that $f(f(f(0))) = f(f(0)) = f(0)$ and $f(f(0)) = f(0),$ so $f(0) = f(0)^2 + f(0).$  Then $f(0)^2 = 0,$ so $f(0) = 0.$  It follows that
\[f(f(x)) = f(x)\]for all $x.$

Setting $x = 1$ in the given functional equation, we get
\[f(y + 1) = f(y) + 1\]for all $y.$  Replacing $y$ with $f(x),$ we get
\[f(f(x) + 1) = f(f(x)) + 1 = f(x) + 1.\]For nonzero $x,$ set $y = \frac{1}{x}$ in the given functional equation.  Then
\[f(1 + f(x)) = x f \left( \frac{1}{x} \right) + f(x).\]Then $x f \left( \frac{1}{x} \right) + f(x) = f(x) + 1,$ so $xf \left( \frac{1}{x} \right) = 1,$ which means
\[f \left( \frac{1}{x} \right) = \frac{1}{x}\]for all $x \neq 0.$

We conclude that $f(x) = x$ for all $x.$  Therefore, $n = 1$ and $s = \frac{1}{2},$ so $n \times s = \boxed{\frac{1}{2}}.$